/*
 * @Description: 
 * @Version: @1.0.0
 * @Autor: LuLu
 * @Date: 2022-09-01 16:23:34
 * @LastEditors: LuLu
 * @LastEditTime: 2022-09-14 15:47:50
 */


import request from "@/utils/request";

// 获取合同列表
export function getContract(params) {
    return request({
        url: "/externalContract",
        method: "GET",
        params
    });
}
// 获取合同列表
export function queryByCustomerId(params) {
    return request({
        url: "/externalContract/queryByCustomerId",
        method: "GET",
        params
    });
}
//新增合同
export function addContract(data) {
    return request({
        url: "/externalContract",
        method: "POST",
        data
    })
}
//编辑合同
export function modifyContract(data) {
    return request({
        url: "/externalContract",
        method: "PUT",
        data
    });
}
//审核 通过合同
export function setSuccess(params) {
    return request({
        url: '/externalContract/success',
        method: "GET",
        params
    });
}
//审核 拒绝合同
export function setReject(params) {
    return request({
        url: '/externalContract/reject',
        method: "GET",
        params
    });
}
//审核  报废合同
export function setCancel(params) {
    return request({
        url: '/externalContract/cancel',
        method: "GET",
        params
    });
}

// 总占比，月度占比（饼状图）
export function getStatistic() {
    return request({
        url: '/externalContract/statistic',
        method: "GET",
        
    });
}
// 导出
export function getExport(query) {
    return request({
        url: '/externalContract/list/export',
        method: 'GET',
        params: query
    })
}

// 获取客户公司名称
export function getTradeName() {
    return request({
        url: '/externalContract/getTradeName',
        method: "GET",      
    })
}

